home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource4
/
234_01
/
xdir.doc
< prev
next >
Wrap
Text File
|
1987-06-18
|
35KB
|
1,000 lines
.he XDIR SYSTEM DOCUMENTATION - TABLE OF CONTENTS
.fo xdir.doc 6/26/86 #
System Overview .............................
Background............................
Purpose...............................
Function..............................
System Requirements...................
Cost/Licensing .......................
Bugs/ Enhancements ...................
Using the System
Directory Processing .................
X - delete or erase the file .........
L - list the file to printer .........
T - type the file on the screen ......
R - rename the file ..................
C - copy the file ...................
D - dump the file in hex .............
H - hide the file ....................
U - unhide a file previously marked ..
P - protect as file from erase .......
W - make a file eraseable ............
E - encrypt or decrypt a file ........
S - search for text ..................
Sample Screens
Main Processing Menu..................
Selection Criteria....................
File List.............................
Directory Processing..................
Option Selection......................
File Dumping..........................
System Limitations - Bugs/Enhancements
.pa
.he SYSTEM OVERVIEW
Background
The XDIR system was developed to simplify processing of DOS
commands commonly used, to provide additional system
security and to provide an easier screen presentation for
use by the less knowledgable user. After it was put into
use, additional functions were added to increase its
usefulness and functionality. Thus, what started as a
simple extended directory function grew into a number of
other functions as well.
Purpose
The system is primarily designed to manage the files main
tained on a personal computer as well as provide some file
security capabilities, should that be needed. The system is
targeted at the more experienced user and assumes some
expertise in DOS and knowledge of the hierarchical file
structures of DOS. However, because the system incorporates
many help screens and on-screen prompting, the less
experienced DOS user may also find it helpful.
Functions
The system provides you with the following capabilities:
. Delete, Copy or Rename Files
. Display text files on the screen or list them on the
printer
. Dump files in both ASCII and hexadecimal
. Change file attributes (read-only, hidden, etc.)
. Encrypt and decrypt files for security purposes
. Search for files by date, attribute and wildcard
name
. Search for words in a single file or in a group of
files within a DOS directory
System Requirements
IBM PC or compatible with two drives, 128K and DOS 2.0 or
later. The software requires approximately 30K of disk
space.
.pa
.he USING THE SYSTEM
This section describes in general terms how to use the
system. There is a certain amount of information displayed
on the screens to assist you as you proceed. Some screens
also provide on-line help. The system documentation may
also be viewed on-line. In general, the system is menu
driven and available options will be described on the
screen, or on an accompanying help screen.
In this section we will describe the various components of
the system and also refer to sample screen displays to
provide you with an actual sample of the type of informa
tion you may expect to see.
Starting up
From the DOS prompt line type the program name ("xdir")
which begins the processing. You may also enter a directory
name on the command line to begin processing that directory
directly (such as XDIR 123). If you enter the word "HELP"
on the command line the help text file is displayed.
Entering XDIR without any command line arguments displays
the options available and allows on-line help through the
use of the F1 function key.
Once started, the system first searches your default disk
drive for the root directory and all subdirectories. That
list of subdirectories is then sorted by the full path name
and the file names of the directories are displayed on the
initial screen. (See example at figure 1.0 on page ___).
Note that only the file name is displayed, not the full
path name. For example, a subdirectory named \BIN\JOE\LOTUS
would be displayed only as LOTUS but would be grouped with
all other \BIN\JOE and \BIN directories since they would
sort together. The system permits a maximum of 150 direct
ories, including the root directory, to be processed. Re
maining directories, if any, are ignored.
Initial Screen
From the initial screen which displays the directory names,
you select a directory or sub-directory for processing by
moving the cursor to the left of the name of the desired
directory and pressing the letter 's' (for select). If no
selections are desired, and you wish to end XDIR processing
and return to DOS press the enter key.
If your default drive contains more than 68 directories or
sub-directories, (68 is the most that will be displayed on
a single screen) you will need to use the PgDn and PgUp
keys to go to following or previous screens in the event
that the desired directory is not visible on the current
screen.
If you press PgUp or PgDn and there are no following or
previous screens, the system returns to the home screen
which contains the first 68 directories in alphabetical
order.
.cp 10
Cursor movement is accomplished through the use of the
arrow keys and also the Home key which returns you to the
upper left hand corner of the screen. On this screen, the
only valid entries are the various arrow keys, the PgUp,
PgDn F1 (Help) Home and End keys. Other characters are
ignored by the system.
File Selection Criteria
Once you have selected a directory for processing on the
main menu by entering the letter 'S' next to the desired
directory, you are now ready to specify the selection
criteria, since you may not with to work with all of the
files in the directory at this time. The names of those
files meeting you search criteria will be displayed and you
may optionally request a list of the other information
(such as file size, file attributes date and time of last
update etc.). The system will display a prompting message
similar to the example shown at figure 2.0 on page x.x. In
order to obtain the optional directory list on the screen,
answer either 'A', 'D' or 'Y' to the list prompt. If you do
not wish to specify the file criteria (use the default
which is all files in the directory) press the escape key
(ESC). The default value (if the enter key is pressed is
the alphabetic sequence).
The list options specified (A, D or S) determine the sort
sequence in which the files will be listed:
A - Alphabetic by file name
D - Date sequence in descending order
S - Sort by file size in ascending order
The three selection criteria which are provided are:
. Directory date
. File name mask
. File attributes
In order to be selected, a file must meet all the search
criteria, which are explained in more detail below:
Directory Date
Only those files which have been updated subsequent to the
date specified will be elgible for selection. The date is
entered in the format YYMMDD without intervening slashes or
other punctuation. The system does no verification other
than that six characters have been entered. An invalid date
is interpreted as a date of 0 (which then causes all files
to be elgible for selection). The default date is 0 or all
files.
File Name Mask
This is the same as you would enter for the directory
searches with the DOS dir command (e.g *.exe for all execu
table files ). The default entry if no information is
entered is *.* (all files).
.cp 10
File Attributes
You may limit your search to files with specific attributes
:
r - readonly
h - hidden
s - system
a - archive
Files which are labels or directories are not elgible for
processing. Multiple search attributes may be specified by
entering them in combination with no intervening spaces.
For example, if you wanted to find all files which are
either read only or system you would specify "rs". Note
that a file which contains any of the attributes will be
selected.
Once the answers have been provided to the system, it will
then search the specified directory and take the following
actions:
. If no files were found which meet the search crite
ria (or if the directory were empty) a message is
displayed, and the system returns to the initial menu.
. The selected files will be sorted by filename
. If the list option was specified (A, D S), the
requested directory information will now be displayed.
(See example in figure 3.0 on page ___.).
. An action screen will be displayed which contains
the names of each of the selected files.
When all information has been entered, you will be
asked to verify the entries by responding 'yes' or
'no' to the prompt asking if the system should
proceed. An answer of 'n' permits you to revise the
action specifications. The default value is 'n'.
Note: By pressing the escape key in response to the
list prompt, all default values are taken and no
further prompting is performed.
Action Screen
This is the heart of the system which allows you to specify
the action to be taken for each of the selected files, if
any. Once you have indicated the actions to be taken, the
system then displays the file names and the actions to be
taken and requests that you verify the actions. See example
at figure 5.0 on page x.x. If the actions indicated are not
desired, you may answer no to return to the screen and
specify the actions you do wish. (See example at figure 4.0
on page ____.) Hidden files are highlighted in reverse
video for easy identification.
.pa
The codes which may be used to specify the actions are as
follows:
X - delete or erase the file
L - list the file to the printer
T - type or display the file on the screen
R - rename the file
C - copy the file
D - dump the file in ascii and hexadecimal
H - hide the file by setting the hidden attribute
U - unhide a file previously marked as hidden
P - protect as file from erase by making it readonly
W - make a file eraseable (opposite of P)
E - encrypt or decrypt a file
S - search a file or directory for text
Cursor movement is done using arrow keys. In addition, the
following keys have the following meanings:
Home - return to the upper left hand corner of the
screen
PgUp - return to the previous screen *
PgDn - go the following screen *
* These commands are only used when there are more than 68
selected files in the directory which is the most that XDIR
will display on a single screen. If these commands are
entered and there is no previous or following screen, the
first screen will be displayed.
The meaning of each of the codes are described in more
detail below:
X - delete
This code is used to delete or erase a file from the
specified directory. Before that action is taken, a
final verification is done.
L - list the file to the printer
This code will cause a listing to be sent to the
device "PRN". The system assumes that all lines are
terminated by a carriage return and linefeed, and have
a length of no more than 80 printable characters. The
system lists 60 lines per page and issues form feeds
between pages and at the end of the report. The first
page lists the document DOS file name.
.cp 8
T - type or display the file to the screen
The typing selection allows more than its name would
suggest. This selection permits a view of the selected
text file a page at a time. Also, specific strings of
text may be searched. Because the text is displayed a
screen at a time, you may page back and forth within
the text. When you select this option for a file, the
system will display the first page of text and then
provide a prompting liner at the bottom. The options
and their meanings are explained on-line using the F1
key. Those actions are:
. PgUp - disp0lay the previous page
. PgDn - display the next page
. Home - go to the first page
. End - go to the last page
. Cr - advance to the next page
. F1 - display on-line help
. +nnn - advance nnn pages or go to the end of the
document, whichever is closer
.-nnn - go backwards nnn pages or to the beginning
of the document, whichever is closer
. S - enter a search string to search beginning
at the current page. If found the page is displayed
and the text is highlighted on the screen, otherwise a
message is displayed and the current page remains
. ESC - end further processing
R - rename the file
The system will prompt you for the new name of the
file. If you do not wish to change the name, press the
Enter key. Otherwise, specify the new name (including
the path). A file name which does not begin with a '\'
will be considered to be in the same subdirectory.
C - copy the file
The system will ask the name of the file you wish to
copy this file to. If you do not wish to copy the
file, press enter. Otherwise, specify the file name
(including path). If you wish to copy a group of files
to another directory, enter that subdirectory name.
The system will then ask if you wish to do "bulk"
copying. An answer of yes results in all subsequent
copy requests to be directed to that subdirectory.An
answer of no will copy only that one file and continue
prompting. Thus, if you wish to combine both single
and bulk copies, the single copies must be specified
first.
D - dump the file in ascii and hexadecimal
The file will be dumped in both hex and ascii starting
at the beginning of the file. Files are dumped in
blocks of 256 bytes. The offset of dump from the
beginning of the file is displayed at the left of each
line of the dump in hexadecimal. Unprintable charac
ters (those with value greater than hex 7f or less
than hex 20 are shown as a decimal point '.'.
At the bottom of the screen the available options are
displayed. On-line help is provided with the F1 key.
The options and their meanings are:
. PgDn - display next record
. PgUp - display previous record
. Home - display the first record
. End - display the last record
. Cr - display the next record
. +nnn - go forward nnn blocks of 256 bytes
. -nnn - go backwards nnn blocks of 256 bytes
. ESC - end file dump
H - hide the file by setting the hidden attribute
This command causes the DOS directory attribute byte
to be set to hidden. If the file was already hidden,
the command will be ignored. The file will not be
shown using the DOS dir or type commands nor will DOS
copy command copy the file. Hidden files are displayed
on the file selection screen in reverse video.
U - unhide a file previously marked as hidden
P - protect as file from erase by making it readonly
This command defines the file to be readonly and
therefore it may not be erased or deleted except by
removing that attribute. If the file was already read
only, the command is ignored. To delete the file,
first use the 'W' command described below.
W - make a file eraseable (opposite of P)
This command is the opposite of the P command above.
E - encrypt or decrypt a file
This command will encrypt or decrypt a file in order
that its contents will not be readable except through
knowledge of the key. The system will display the name
of the file be encrypted or decrypted and the ask that
the new name and the "key" be provided. The new name
is the name of the encrypted or decrypted file. The
key is a word you must supply in order to restore the
readability of the file. The key used to encrypt
a file is required to decrypt it.
A word of caution. If the key is forgotten, there is
no way to restore the file contents, and it will be
effectively destroyed.
Example:
Old file - customer.wk1
New file - custlist.wk1
Key - f123x
The existing file named customer.wk1 needs to be
secured from viewing. Select encryption, and supply
the file name to be encrypted as "customer.wk1" and
the encryption key of f123x and the name of the
encrypted file to be "custlist.wk1". The system will
encrypt the old file and name the encrypted version
custlist.wk1. The clear text file customer.wk1 should
be erased and its contents overwritten. (If not, the
file could be recovered through the Norton Utilities
or comparable routine). To decrypt the file, use the
process in reverse, i.e specify name of existing file
as custlist.wk1, new file as customer.wk1 and
decryption key as f123x.
S -Search a single file or a directory for specific text.
With this command you can locate files which contain a
specific sequence of text characters. Included within
the search text are allowed wild cards (* and ?) which
work like the corresponding DOS functions except that
there is no limit to the number of characters for
which the asterisk may substitute.
The search may be restricted to a single file or to
all files in a directory. The search may be further
limiteted to exclude or include specific file
extensions such as "COM" or "EXE". The search may also
ignore upper case, if that is desired.
The entry of the information contains prompting
information and on-line is available.
The search text is entered on a sinbgle line as
multiple words. The space character is assumed to be
the delimiting character. Special characters may be
entered by using either the escape sequences or by
specifying the value of the character in octal. For
example:
Entered Character Interpreted as:
\\ \
\' '
\n <ENTER>
\b backspace
\r linefeed
\f formfeed
\t tab
\" double quote
\015 carriage return
.pa
File Processing
Once all options have been selected, type the Enter key to
begin processing. If no options have been selected, you
will be returned to the main menu. Otherwise, the system
will display the names of the files to be processed
(including their full path name) and the actions to be
taken in words (such as "will be deleted" or "will be
encrypted"). After all files have been displayed, the mes
sage "Continue Processing(Y)es (N)o is displayed. Answer
'y' to take the indicated actions. The default is no which
will return you to the selection screen where you may
revise your selections.
When you have finished, the system will then perform the
actions you requested without intervention where possible.
However, the system will confirm that you wish to delete
files. In addition, the system must prompt you for informa
tion for file copies, renames and encryptions.
Once all processing has been completed, the system will
return again to the main list of system directories for
continued processing.
.pa
.he SYSTEM LIMITATIONS BUGS/ENHANCEMENTS
The following limitations are in the existing system:
Maximum directories which can be processed - 150
Maximum files per directory selected - 850
.pa
The following screen is an example of the selection screen for
the directory to be selected.
_____________________________________________________________
| Hard Disk File Manager - Directory **ROOT** |
| |
|[ ] **ROOT** |
|[ ] 123 |
|[ ] BIN |
|[ ] C |
|[ ] DBASE |
|[ ] HEADERS |
|[ ] SCOM |
|[ ] SYSARCH |
|[ ] SYSTEM |
|[ ] TEST |
| |
| |
| |
| |
| |
| Options: <CR> = end, (S)elect |
| PgUp = previous display PgDn = next |
____________________________________________________________
Figure 1.0
Once the directory has been selected, the options for the
selection of files are presented:
_____________________________________________________________
| Hard Disk File Manager - File Selection Criteria |
| Processing Directory - SYSTEM |
| |
| |
| |
| List (A)lpha (D)ate (S)ize ESC=End D |
| After Date YYMMDD 860301 |
| Search Mask [*.*] *.exe |
| File attribute to search? |
| Above items OK? (Y,N) |
| |
| ___________ |
| |Attributes| |
| |(R)eadonly| |
| |(H)idden | |
| |(S)ystem | |
| |(A)rchive | |
| |__________| Press F1 for Help |
____________________________________________________________
Figure 2.0
The following screen will display the information for the
requested files:
______________________SYSTEM_________________________________
|Filename Attr Length Date Time Path |
|XDIR.EXE a 21198 04/30/86 08:21a \SYSTEM\XDIR.EXE |
|LOOK.EXE a r 10322 04/23/86 07:45a \SYSTEM\LOOK.EXE |
|UNTAB.EXE a h 11054 04/20/86 10:20a \SYSTEM\UNTAB.EXE |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| End of display - press any key |
____________________________________________________________
Figure 3.0
The following screen presents the file selection criteria:
_____________________________________________________________
| Hard Disk File Manager - Directory \SYSTEM |
| |
| [D] XDIR.EXE |
| [ ] LOOK.EXE |
| [ ] HIDESEEK.EXE |
| [H] UNTAB.EXE |
| [R] AR.EXE |
| |
| |
| |
| |
| |
| |
| |
| |
| Options: <CR> = End, X = Delete, (L)ist (T)ype (R)ename |
| PgUp = previous display PgDn = Next F1 = Help |
| (C)opy (D)ump (E)ncrypt (S)elect |
| (H)ide (U)nhide (P)rotect (W)rite (E)ncrypt |
____________________________________________________________
Figure 4.0
After all selections have been entered, the following screen
presents the options selections and asks that you verify them. If
they are correct, enter 'Y', otherwise you will be returned to
edit your previous selections
_____________________________________________________________
| Hard Disk File Manager - Verify Options |
| |
| File XDIR.EXE will be dumped |
| File LOOK.EXE will be copied |
| File UNTAB.EXE will be hidden |
| File AR.EXE will be renamed |
| File TEST.DAT will be deleted |
| Continue Processing? (Y)es (N)o |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
____________________________________________________________
Figure 5.0
A dump of a file will result in a screen as follows:
Dump of file \SYSTEM\XDIR.EXE
0000 4d 5a ce 00 2a 00 01 00 20 00 bd 00 ff ff c3 05 MZ..*.........
0010 64 00 57 e5 50 3a 00 00 1e 00 00 00 01 00 51 3a d.W.P:......Q.
0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
0030 64 00 57 e5 50 3a 00 00 1e 00 00 00 01 00 51 3a d.W.P:......Q.
0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
0050 4d 5a ce 00 2a 00 01 00 20 00 bd 00 ff ff c3 05 MZ..*.........
0060 64 00 57 e5 50 3a 00 00 1e 00 00 00 01 00 51 3a d.W.P:......Q.
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
0080 64 00 57 e5 50 3a 00 00 1e 00 00 00 01 00 51 3a d.W.P:......Q.
0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
00a0 4d 5a ce 00 2a 00 01 00 20 00 bd 00 ff ff c3 05 MZ..*.........
00b0 64 00 57 e5 50 3a 00 00 1e 00 00 00 01 00 51 3a d.W.P:......Q.
00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
00d0 64 00 57 e5 50 3a 00 00 1e 00 00 00 01 00 51 3a d.W.P:......Q.
00e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
00f0 4d 5a ce 00 2a 00 01 00 20 00 bd 00 ff ff c3 05 MZ..*.........
Options : ESC = end F1 = Help +nnn -nnn nnn PgUp PgDn
_____________________________________________________________
| Hard Disk Manager - Selection Processing |
| |
| Copy from file \SYSTEM\LOOK.EXE to ? \123 |
| Desire Bulk Copy? (Y)es (N)o |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
____________________________________________________________
The listing below is that which would be obtained from "typing"
a file (selection type T).
Listing of file \BIN\XDIR.C page 20
/*
test.c
this is a test suubroutine
*/
#include "dir.h"
test(parm1,parm2)
char *parm1;
char *parm2;
{
int i,j; /* temporary variables */
char work[20];
char *cp;
for (i=0;i<10;i++) c = getch();
while (1)
Options: ESC = end F1 = Help +nnn -nnn nnn PgUp PgDn